admin.service('authService', function($cookies,$cookieStore,$rootScope,$location) {
	this.checkLogin = function(){
		var data = $cookieStore.get('token');
		if(data != null) return true;
		else return false;
	}
	
	this.setToken = function(token){
		$cookieStore.put('token',token);
	}
	
	this.logout = function(){
		$cookieStore.remove('token');
	}
});

